using System;
using System.Collections.Generic;
using System.Text;
using Cobalt75.GreyMatter;
namespace Cobalt75.GreyMatter.TesterTypes
{
    [
    GMTable(
        TableName = "styles",
        TableID = "STYLES",
        ApproxSize=8000,
        Priority = 2
        )
    ]
    public class Style : GMTable
    {
        public Style(GMCommunicator com)
            : base(com)
        {
            pPlus = new GMRelations<Plu>(this);
            pGroups = new GMParameterRelation<Group, int>(this);
            pProperties = new GMIndexedRelations<Property, PropertyType>(this);
            pContacts = new GMIndexedRelation<ContactDetail, ContactType>(this);
        }

        [GMRelationColumn()]
        private GMIndexedRelation<ContactDetail,ContactType> pContacts;
        public GMIndexedRelation<ContactDetail, ContactType> Contacts
        {
            get
            {
                return pContacts;
            }
        }

        [GMColumn]
        private string pLabel = "";
        public string Label
        {
            get
            {
                return pLabel;
            }
            set
            {
                pLabel = value;
                Changed();
            }
        }
        [GMColumn]
        private string pManfName = "";
        public string ManfName
        {
            get
            {
                return pManfName;
            }
            set
            {
                pManfName = value;
                Changed();
            }
        }

        [GMRelationColumn()]
        private GMRelations<Plu> pPlus;
        public GMRelations<Plu> Plus
        {
            get
            {
                return pPlus;
            }
        }
        [GMRelationColumn(
                    ParameterName = "level",
            AllowDuplicates=true)]
        private GMParameterRelation<Group,int> pGroups;
        public GMParameterRelation<Group, int> Groups
        {
            get
            {
                return pGroups;
            }
        }


        [GMRelationColumn(
          )]
        private GMIndexedRelations<Property, PropertyType> pProperties;
        /// <summary>
        /// Properties is an indexed non-unique relation...
        /// You can have more than one property of the same propertytype
        /// </summary>
        public GMIndexedRelations<Property, PropertyType> Properties
        {
            get
            {
                return pProperties;
            }
        }
    }
}
